let mut ops = ops::TestOptions {
no_run: options.flag_no_run,
compile_opts: ops::CompileOptions {
- update: false,
env: "bench",
shell: shell,
jobs: options.flag_jobs,
--features FEATURES Space-separated list of features to also build
--no-default-features Do not build the `default` feature
--target TRIPLE Build for the target triple
- -u, --update-remotes Deprecated option, use `cargo update` instead
--manifest-path PATH Path to the manifest to compile
-v, --verbose Use verbose output
", flag_jobs: Option<uint>, flag_target: Option<String>,
};
let mut opts = CompileOptions {
- update: options.flag_update_remotes,
env: env,
shell: shell,
jobs: options.flag_jobs,
-j N, --jobs N The number of jobs to run in parallel
--features FEATURES Space-separated list of features to also build
--no-default-features Do not build the `default` feature
- -u, --update-remotes Deprecated option, use `cargo update` instead
--manifest-path PATH Path to the manifest to document
-v, --verbose Use verbose output
let mut doc_opts = ops::DocOptions {
all: !options.flag_no_deps,
compile_opts: ops::CompileOptions {
- update: options.flag_update_remotes,
env: if options.flag_no_deps {"doc"} else {"doc-all"},
shell: shell,
jobs: options.flag_jobs,
--features FEATURES Space-separated list of features to also build
--no-default-features Do not build the `default` feature
--target TRIPLE Build for the target triple
- -u, --update-remotes Deprecated option, use `cargo update` instead
--manifest-path PATH Path to the manifest to execute
-v, --verbose Use verbose output
let root = try!(find_root_manifest_for_cwd(options.flag_manifest_path));
let mut compile_opts = ops::CompileOptions {
- update: options.flag_update_remotes,
env: if options.flag_release { "release" } else { "compile" },
shell: shell,
jobs: options.flag_jobs,
--features FEATURES Space-separated list of features to also build
--no-default-features Do not build the `default` feature
--target TRIPLE Build for the target triple
- -u, --update-remotes Deprecated option, use `cargo update` instead
--manifest-path PATH Path to the manifest to build tests for
-v, --verbose Use verbose output
let mut ops = ops::TestOptions {
no_run: options.flag_no_run,
compile_opts: ops::CompileOptions {
- update: options.flag_update_remotes,
env: "test",
shell: shell,
jobs: options.flag_jobs,
use util::{CargoResult, Wrap, config, internal, human, ChainError, profile};
pub struct CompileOptions<'a> {
- pub update: bool,
pub env: &'a str,
pub shell: &'a mut MultiShell<'a>,
pub jobs: Option<uint>,
pub fn compile(manifest_path: &Path,
options: &mut CompileOptions)
-> CargoResult<ops::Compilation> {
- let CompileOptions { update, env, ref mut shell, jobs, target,
+ let CompileOptions { env, ref mut shell, jobs, target,
dev_deps, features, no_default_features } = *options;
let target = target.map(|s| s.to_string());
let features = features.iter().flat_map(|s| {
log!(4, "compile; manifest-path={}", manifest_path.display());
- if update {
- return Err(human("The -u flag has been deprecated, please use the \
- `cargo update` command instead"));
- }
-
let mut source = try!(PathSource::for_path(&manifest_path.dir_path()));
try!(source.update());